<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<my-component></my-component>
			<my-component></my-component>
			<my-component></my-component>
</div>
<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
<script>
			// var data = {
			// 	counter: 0
			// };
			Vue.component('my-component',{
				template: '<button @click="counter++">单击了{{counter}}次</button>',
				data: function(){
					// return data;
					return{
						counter:0
					}
				}
			});
			var app= new Vue({
				el: '#app'
			});
</script>

	</body>
</html>
